package my.edu.ai.service;

import cn.hutool.json.JSONObject;
import com.baomidou.mybatisplus.extension.service.IService;
import com.fasterxml.jackson.core.JsonProcessingException;
import my.edu.ai.entity.AiChat;
import my.edu.ai.entity.vo.AiChatVO;
import org.springframework.ai.chat.messages.Message;

import java.util.List;

public interface IAiChatService extends IService<AiChat> {

//    String sendMessage(String message, Integer chatId);

    List<Message> getMessagesByConversationId(String conversationId, int lastN);

    void addMessages(String conversationId, List<Message> messages) throws JsonProcessingException;

    JSONObject addChat();

    String getConversationId(Integer chatId);

    void removeByChatId(Integer chatId);

    List<AiChatVO> listChat();

    AiChat getOneChat(Integer chatId);
}
